<template style="height:100%">
    <view class="index" style="height: 100%;
	display: flex;
	flex-direction: column;
	background-color: #009EF0;
	background: url('../../static/image/background1.png') no-repeat center;
	background-size: cover;">
        <view class="uni-padding-wrap">
            <view class="page-section swiper">
                <view class="page-section-spacing">
                    <swiper class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval" :duration="duration">
                        <swiper-item v-for="item in swiperImg" :key="item.ImgID">
                            <view class="swiper-item uni-bg-red">
								<image class="swiperIMG" :src="item.imgsrc"/>
							</view>
                        </swiper-item>
                    </swiper>
                </view>
            </view>
        </view>
		<view class="main">
			<text class="top" style="color:#fff">任务与功能</text>
			<view class="center">
				<view class="item" @click="weather">
					<image style="width: 40px;height: 40px;" :src="src1"></image>
					<text style="font-size:14px;text-indent:5px;">天气查询</text>
				</view>
				<view class="item" @click="mail">
					<image style="width: 40px;height: 40px;" :src="src2"></image>
					<text style="font-size:14px;text-indent:5px;">通讯录查询</text>
				</view>
			</view>
			<view class="bottom">
				<view class="item" @click="report">
					<image style="width: 40px;height: 40px;" :src="src3"></image>
					<text style="font-size:14px;text-indent:5px;">情况上报</text>
				</view>
				<view class="item" @click="monitor">
					<image style="width: 40px;height: 40px;" :src="src4"></image>
					<text style="font-size:14px;text-indent:5px;">监测数据查询</text>
				</view>
			</view>
		</view>
    </view>
</template>

<script>
	export default {
    data() {
        return {
			swiperImg:[
				{ImgID:1,imgsrc:require("../../static/image/index_swiperImg (1).jpg")},
				{ImgID:2,imgsrc:require("../../static/image/index_swiperImg (2).jpg")},
				{ImgID:3,imgsrc:require("../../static/image/index_swiperImg (3).jpg")},
				{ImgID:4,imgsrc:require("../../static/image/index_swiperImg (4).jpg")},
				{ImgID:5,imgsrc:require("../../static/image/index_swiperImg (5).jpg")}
			],
            background: ['color1', 'color2', 'color3'],
            indicatorDots: true,
            autoplay: true,
            interval: 2000,
			duration: 500,
			src1:require("../../static/image/weather.png"),
			src2:require("../../static/image/mail.png"),
			src3:require("../../static/image/report.png"),
			src4:require("../../static/image/search.png")
        }
    },
    methods: {
		weather(){
			uni.navigateTo({
				url:'../index/weather/weather'
			})
		},
		mail(){
				uni.navigateTo({
				url:'../index/mail/mail'
			})
		},
		report(){
				uni.navigateTo({
				url:'../index/report/report'
			})
		},
		monitor(){
				uni.navigateTo({
				url:'../index/dataquery/dataquery'
			})
		}
    }
}
</script>

<style>

uni-page-body{
	height: 100%;
}

/* .index{

} */
.swiper-item{
	height: 100%;
	border: 1px solid #EEEEEE;
	border-radius: 10px;
}
.uni-padding-wrap{
	flex: 1;
	padding: 24px 14px 0;
}
.page-section-spacing{
	height: 70%;
	border-radius: 10px;
}

.swiperIMG{
	width: 100%;
	height: 100%;
	border-radius: 10px;
}
.swiper{
	height: 120%;
}

.main{
	flex: 1.5;
	display: flex;
	flex-direction: column;
	padding: 20px 15px;
}
.center,.bottom {
	margin-top: 20px;
	display: flex;
	justify-content: space-around;
}
.item{
	width: 153px;
	height: 84px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid #eee;
	border-radius: 5px;
	color: #fff;
	box-shadow: 0 4px 8px #f1f1f1;
}
</style>
